package com.wenx.v3system.modular.cloud.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wenx.v3system.modular.cloud.domain.po.SysUserTeam;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 系统用户团队Mapper接口
 */
@Mapper
public interface SysUserTeamMapper extends BaseMapper<SysUserTeam> {
    
    /**
     * 物理删除用户团队关联（绕过逻辑删除）
     * @param userId 用户ID
     * @return 删除记录数
     */
    @Delete("DELETE FROM sys_user_team WHERE user_id = #{userId}")
    int physicalDeleteByUserId(@Param("userId") Long userId);
    
    /**
     * 物理删除团队用户关联（绕过逻辑删除）
     * @param teamId 团队ID
     * @return 删除记录数
     */
    @Delete("DELETE FROM sys_user_team WHERE team_id = #{teamId}")
    int physicalDeleteByTeamId(@Param("teamId") Long teamId);
}